/*gcc -c -o gtkBox.o gtkBox.c `pkg-config --cflags --libs gtk+-2.0`*/
#include "mygtk.h"
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>

Widget_t *createItem(char *itemName)
{
	GtkWidget *item;
	item = gtk_menu_item_new_with_label(itemName);
	return item;
}

Widget_t *createPItem(char *pic, GtkAccelGroup *group)
{
	return gtk_image_menu_item_new_from_stock(pic, group);
}

void setQuickKey(Widget_t *item, GtkAccelGroup *group, int GDK)
{
	gtk_widget_add_accelerator(item, "activate", group, GDK, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE);
}

Group_t *createGroup(Widget_t *root)
{
	GtkAccelGroup *accel_group;
	accel_group = gtk_accel_group_new();
	gtk_window_add_accel_group(GTK_WINDOW(root), accel_group);
	return accel_group;
}

/*
#define setBoxAction(box, func) \
	g_signal_connect(box, "activate", G_CALLBACK(func), NULL)
*/